<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: lk
 * @LastEditTime: 2022-01-10 23:49:06
-->
<template>
  <div ref="left2_container" style="height: 95%"></div>
</template>
<script>
import { Bar } from '@antv/g2plot';

export default {
mounted(){
 this.initChat();
},
methods:{
   initChat(){
     const data = [
  { action: '高铁', pv: 40000 },
  { action: '火车', pv: 45000 },
  { action: '公交', pv: 15000 },
  { action: '自驾', pv: 25000 },
  { action: '飞机', pv: 10000 },
  
];
const barPlot = new Bar(this.$refs.left2_container,{
  data,
  xField: 'pv',
  yField: 'action',
  conversionTag: {},
});

barPlot.render();
}
}
}
</script>